/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class HomeDehumidifier {
    static categoryCode = '010040009';

    static categoryName = '家用除湿机';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return HomeDehumidifier.categoryCode;
    }

    get categoryName() {
        return HomeDehumidifier.categoryName;
    }

    getCurrentHumidity(params) {
        return command({
            method: 'getCurrentHumidity',
            methodId: 'p1vFcGg9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pGoxs3pE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHumidity(params) {
        return command({
            method: 'getHumidity',
            methodId: 'pDrhJxYn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'phEqdcAK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pgh0vbVM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWindSpeed(params) {
        return command({
            method: 'getWindSpeed',
            methodId: 'ptRSCY5l',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setHumidity(params) {
        return command({
            method: 'setHumidity',
            methodId: 'peH3AFMR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'pUPQ5Svz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXwfcW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWindSpeed(params) {
        return command({
            method: 'setWindSpeed',
            methodId: 'pZgR0VfI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default HomeDehumidifier;
